<?php


namespace app\common\model;


use think\Model;
use think\model\concern\SoftDelete;

class Bank extends Model
{
    use SoftDelete;

    // 自动时间戳
    protected $autoWriteTimestamp = true;
    // 软删除自动标记
    protected $deleteTime = 'delete_time';
    // 定义标记字段默认值为 0
    protected $defaultSoftDelete = 0;

    /**
     * 根据id获取银行信息
     * @param $id
     */
    public function getInfo($id)
    {
        return $this->db('Bank')->where('id',$id)->find();
    }
    
    public function getList()
    {
        return $this->db('Bank')->order("id DESC")->select();
    }
}
